﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIA.RbacPassport;

namespace VIA.Presentation.Services
{
    public class PermissionProvider : IPermissionProvider
    {
        public static readonly Permission SaveDoorParam = new Permission("屏蔽安全门", new Guid("FBDAD9B0-72AC-7053-65D5-1231BEDE834B"));
        public static readonly Permission Equipment = new Permission("参数配置", new Guid("991A29D1-BFEC-BB45-D351-31FA80EDC166"));
        public static readonly Permission ManualDebug = new Permission("手动调试", new Guid("DC28C729-5264-519B-4031-47097F6908C3"));
        public static readonly Permission ProductionRecord = new Permission("生产记录", new Guid("7568A38E-84FF-6D2E-7560-28AC29ED1784"));
        public static readonly Permission Settings = new Permission("软件设置", new Guid("885D0A70-9301-6E1D-2DB2-F2AA2EDBF50D"));
        public static readonly Permission OperationLog = new Permission("操作日志", new Guid("c761a754-22b8-43e7-86e7-5ae24456aae7"));
        public static readonly Permission AxisParam = new Permission("轴参数设置", new Guid("7D989F5E-C51A-E310-D583-B71C840141E3"));
        public static readonly Permission SettingParamEnable = new Permission("设备配置", new Guid("0A958990-2E1F-3238-B733-C8FD23CEEAB8"));
        public static readonly Permission SetFeedTrayEnable = new Permission("设置取料行", new Guid("ACE7E6BA-CD98-511E-FE8C-51CA39E88D8D"));
        public static readonly Permission HomeViewOperateEnable = new Permission("主页面操作", new Guid("78E8CCA494DB3B4BBC8BA37AF1036240"));
        public static readonly Permission DataEnable = new Permission("查看数据", new Guid("F3C90D73-E906-F2C0-66EA-114E9240495C"));
        public static readonly Permission RecipeEnable = new Permission("切换配方", new Guid("6B6BE13C-781D-3FF1-4F3B-731900BB107E"));
        //public static readonly Permission CloseProcess = new Permission("软件关闭", new Guid("5B386734-9BFF-0248-DF1A-76155156D83B"));
        //public static readonly Permission SoftwareStop = new Permission("软件停止", new Guid("4759E06A-5006-2C95-5F5A-764F8A94644B"));
        public IEnumerable<Permission> Permissions()
        {
            yield return SaveDoorParam;
            yield return ProductionRecord;
            yield return Equipment;
            yield return Settings;
            yield return OperationLog;
            yield return ManualDebug;
            yield return SettingParamEnable;
            yield return AxisParam;
            yield return SetFeedTrayEnable;
            yield return HomeViewOperateEnable;
            yield return DataEnable;
            yield return RecipeEnable;
        }
    }
}
